rest of problem 1