added security when creating new model