public boolean containsNode(Node node) {
    if (this.equals(node)) {
      return true;
    } else {
      if (leftChild != null) {
        if (leftChild.containsNode(node)) {
          return true;
        }
      }
      if (rightChild != null) {
        if (rightChild.containsNode(node)) {
          return true;
        }
      }
    }
    return false;
  }