header dialog refactoring