moved GUI stuff to GUI