assignment 7 - add solution to problem 1