class object for transaction and bug fix for transaction