solutions for problem 13 and 14