router from hij, also better error handling