formatting the routes for addition to database