updated comments in engine.js