validation code added for models