Added solenoid code