added option to supply custom response headers