implemented prototype-based widgeting