simple level-order-traversal of the tree