refactor navigate