add validation in model