the final verion of models.py