implement transaction/2