update core.js code