added gzip functionality