Update engine.js