Added transaction_class utility function