Problem 2 final

cleaned version of problem 2 answer