fixed schemas and added validations