unifing gui and logic, step 3.