weighing trees heuristically