added only the string version KMP