change the way to create the routes
Merge pull request #1 from pola88/return_an_object

change the way to create the routes