How to build a router planner