better do_transaction compatibility