add schema validation (closes #4)