adding updating of the balance when creating a transaction