refactor route