Relay Control Sketch