refactor header