added solenoid control