updated tree iterator