changed core.js a bit