made compression dependant on environment variable