add header parsing functionality