Updated the output for solution to problem 4