reimplement route and fix tests