sets up routers and controllers