added controlGUI code