committing final version of problem 2