worked out some of the routing