added code for relay control via gpio