updates plus some debug output. CLOSED TREE