refactor to use express.Router