implementing transaction api