more trx validation code