minor improvement in stringSimilarityForward