Converted solenoid implementation to relay