working through problem 3