fixed solution to problem 12
solution to problem 13
solution to problem 14