starting function for gui in logic