Update engine.cpp