migrate routing to route, renamed fn to handler