functions added to the model.py