updated controlGUI code