started new structure with separate class for gui handling