change way to control relay