refactor router API