added support for custom payloads