add the route function