improve model validate