add InitOnOff and test