Update lib/core.js