switched from array to object to deal with list of widgets