exam problem 3
finished 3 and 4