fully implemented the GUI