added simple validation to models