replaced trxId with ref to trx