added validations to data using the schemas