Working out the routing