parse complete header