added optional schema keys to schemadef fns