output of problem 3 updated