navbar refactoring