refactoring and commenting of DonGUI