added control for output objects in the gui in example 4.2