solved problem 12
solved problem 13