solution to homework

Adding solution to homework.