changes to return the longest common sequence