beginnings of problem 4