added answer for problem 4