cleaned up a little bit the routing system