This completes problem 1