schema definition + transact code