made solenoid event handler work