completed level of tree's nodes function