adding to longest subsequence