move the trx parser out from the patch