Implement transaction.