refactor schemata