refactor the header