better model validation