change the way to create the routes