refactoring teacher navbar