instantiate widget when passing a class to widget helper