callback handling of headers