finished basic Aho-Corasick, changed elapsed time measuring