added support for payloads in headers