public int store(char[] word, INFO inode) {
		int child_index, new_index;
		int i, j;
		int widx;

		TNODE parent;

		if(word.length == 0) {
			return -1;
		}


		// it first searches the trie structure with the word
		search(word);
		
		// it stores the part of the word not in the structure
		widx = search_end;
		if (search_end == 0) {
			parent = node_head;
		} else {
			parent = trie_buf[search_idx[search_end - 1]];
		}

		while (widx < word.length) {
			char c = word[widx];
			short cs = parent.child_size;
			if (cs == 0) {
				// if it has no child, allocates a new child
				new_index = node_alloc(1);
				trie_buf[new_index].key = c;
				trie_buf[new_index].child_idx = 0;
				trie_buf[new_index].child_size = 0;
				parent.child_size = 1;
				parent.child_idx = new_index;
				search_idx[search_end] = new_index;
				search_key[search_end] = c;
				search_end++;
				widx++;
				parent = trie_buf[new_index];
			} else {
				// if it has more than one child, allocates (cs + 1) nodes, and copy the existing children
				new_index = node_alloc(cs + 1);
				child_index = parent.child_idx;
				for (i = 0; i < cs; i++) {
					if (trie_buf[child_index + i].key < c) {
						TNODE tmp = trie_buf[new_index + i]; 
						trie_buf[new_index + i] = trie_buf[child_index + i];
						trie_buf[child_index + i] = tmp;
					} else {
						break;
					}
				}
				trie_buf[new_index + i].key = c;
				trie_buf[new_index + i].child_idx = 0;
				trie_buf[new_index + i].child_size = 0;
				search_idx[search_end]	= new_index + i;
				search_key[search_end]	= c;
				search_end++;
				widx++;

				for(j = i; j < cs; j++){
					TNODE tmp = trie_buf[new_index + j + 1];
					trie_buf[new_index + j + 1]	= trie_buf[child_index + j];
					trie_buf[child_index + j] = tmp;
				}

				parent.child_idx = new_index;
				parent.child_size = (short)(cs + 1);

				node_free(child_index, cs);
				parent = trie_buf[new_index + i];
			}
		}

		// inserts the information to the word
		if(parent.info_list == null) {
			parent.info_list = new LinkedList<INFO>();
		}
		
		INFO in = new INFO();
		in.phoneme = inode.phoneme;
		in.tag = inode.tag;

		parent.info_list.add(in);
		
		return 0;
	}