reorganized and simplified the header structure