Answer for problem 5