Relay and its main function