implement a router

the router delegates to the appropriate method handler