fixed version of pat's compressor. doesn't really work well