refactors header