added more model validation