add Transaction trait for wrapping code block with transaction
Use Transaction trait