refactoring for header