code: void add(Node node) {
  
  		if (!(node instanceof Criteria)) {
  			throw new IllegalArgumentException("Can only add instances of Criteria");
  		}
  
  		node.setParent(this);
  
  		boolean containsNearFunction = this.siblings.stream().anyMatch(criteria -> criteria.getPredicates().stream()
  				.anyMatch(predicate -> predicate.getKey().equalsIgnoreCase("$within")));
  
  		Criteria criteria = (Criteria) node;
  		if (containsNearFunction) {
  			this.siblings.add(0, criteria);
  		} else {
  			this.siblings.add(criteria);
  		}
  
  		this.mostRecentSibling = node;
  	}
docs: ------- NODE STUFF --------