Use reference
Add support for transaction