added validations to models