moved initGUI to a class