adding longest common subsequence implementation