addded the snippet for transaction