A (pseudo) trie based search