implementing the router, updating where we handle some errors