worked out problem 1!