implement change to core.js, add jasmine spec test