added validation on models