add support for header callback.