gui part of exercise 5.4