model.py updated