added some validations to models