createWidget has been improved