moved quality check higher
gzip optimizations