10 is finished, using a modified version of 7's solution