trie made and finding longest prefix done