adding better support for response headers