added more function to models.py