schema validation function working
valid and loaded flags read-only