wrote up a description of the algorith, now I am discussing my implementation