implemented router and wrote test skeleton