fixed delete function of data structure trie