solutions to problem 3