added longest increasing subsequence