set up routes in proper order