compressor and solenoid code from andrew