now lcs algorithm works well