add longest common subsequence and get method