added naive kmp substr search