refactoring of navigation