Adding collect to main.js