updating model.py to replace schema.py