def balance
      node = self
      i = (node.count(:right) - node.count(:left))/2
      while (i!=0)
        if (i>0)
          mvnode = node.right
          node.right = nil
          mvnode.add_horizontal node
          i -= 1
        else
          mvnode = node.left
          node.left = nil
          mvnode.add_horizontal node
          i += 1
        end
        node = mvnode
      end
      if (node.left != nil)
        node.left = node.left.balance
      end
      if (node.right != nil)
        node.right = node.right.balance
      end
      if (node.down != nil)
        node.down = node.down.balance
      end
      node
    end
def balance
      node = self
      i = (node.count(:right) - node.count(:left))/2
      while (i!=0)
        if (i>0)
          mvnode = node.right
          node.right = nil
          mvnode.add_horizontal node
          i -= 1
        else
          mvnode = node.left
          node.left = nil
          mvnode.add_horizontal node
          i += 1
        end
        node = mvnode
      end
      if (node.left != nil)
        node.left = node.left.balance
      end
      if (node.right != nil)
        node.right = node.right.balance
      end
      if (node.down != nil)
        node.down = node.down.balance
      end
      node
    end
Recursively balance this node in its own tree, and every node in all four directions,
 and return the new root node.