much more robust header layout