continuining porting of program to the GUI version