finished explanation for problem 12
solved problem 13