testing, and more efficient methods

compute one of the lcs as you go in matrix.