solutions for problem 9~10