Solutions to problem 2