added a model and some validation