implement the GUI