Extract new method call it updateTheBalance(List<Transaction> transactions) from updateBalance(). The new method handles the update operation of the balance. This is the first step to move it to the class it belongs to (the Transaction).