implemented toggle widget