Add ability to pass array of routes to the route function