added callback to widget constructors