Update model.cpp