added support for gzip compression as well