isBalanced adding iterative method