added support for custom headers