refactor header part.