improvements for on/off value attribute