implementing auto_complete feature using Trie's