problem 2 for exam