Finish problem 2 and add problem 2 output