adding comments to the balanceNode method for inspection