router refactoring, replace class with static functions