adds ability to swap widgets.