code review for model.py