extract routes from handler