Added Q13 to Q18, Q13 still has some bugs, but it was a really big problem, and I get the general algo. Go back if there is time later