solutin to problem 5