type definition and transaction