Added relay state support