started implementing longestCommonSubstring