Added a new test for balance and the code to pass the test