add LCS's implementation