refactor router.js
refactor router.js: make only one method call
Merge pull request #15 from Nowaker/feature/refactoring

refactor router.js