partial method to parse header