support gzip and meet pep8