refactored package.js