solved problem 10 to 12