refactor Router