update togglebutton