added errors updated router and tests, main needs tests and would fail if we had them