added some backend code to catch widget generators from front end