added in validation and model trait