add racked router
improve router and add helper functions for wrapper