refactoring head and nav