add gzip compression to http requests
fix bugs