Add transact
Improve example