playing around with transactions
merged with upstream