Controlling the relay