creating collect.js