adding validations and testing models