unifing gui and logic, step 4.