header block refactor