Adding relay control