added relay state