public int ifExists(String to_test) {
		// if the word exists, output its count; else output -1
		if (isVoid) {
			return -1;
		}
		Node start = root;
		int i = 0;
		for (; i < to_test.length() - 1; i++) {
			char c = to_test.charAt(i);
			if (start.children[c - 'a'] == null) {
				return -1;
			}
			start = start.children[c - 'a'];
		}
		char last = to_test.charAt(i);
		if (start.children[last - 'a'] == null) {
			return -1;
		} else {
			if (start.children[last - 'a'].wordcnt < 1) {
				return -1;
			}
			return start.children[last - 'a'].wordcnt;
		}

	}