changing headers parsing code