renamed iterator to itr and added start of subtreeleavesfirstitr