mv emit to collect.js