private static void removeFromTrees(TreeNode treeNode, List trees) {
    boolean found = false;
    // without this initialization, I get a compilation error
    // that says subTree may not have been initialized
    Tree subTree = new Tree(null, null, null);
    for (Iterator iter = trees.iterator(); iter.hasNext(); ) {
      subTree = (Tree)iter.next();
      if (treeNode.equals(subTree.getRoot())) {
        found = true;
        break;
      }
    }
    if (found == true) {  // || (subTree instanceof Tree)) {
      trees.remove(subTree);
    }
   }