compression working, poor code but working :(