Update MatrixEngine.js