update widget

decrease nesting