complete basic aho corasick algorithm