refactor and route changes