create main togglebutton. crash when toggle off