change to allow setting class of widget in model