Added more functions to models.py