canBalance coding bat problem