added routerTest, improved router