private boolean dupi(char[] c) {

		for (int i = 0; i < c.length; i++) {
			if (c[i] != ')') {
				// if not closing bracket or a token
				stack1.push(c[i]);
			} else {
				// if a closing bracket
				char k = stack1.pop();
				boolean tokenize = false;
				while (k != '(') {
					if (k != '(' || k != ')') {
						tokenize = true;
					}
					k = stack1.pop();
				}
				if (!tokenize) {
					return true;
				}
			}
		}

		return false;
	}