set routes and set up keys