removed console.log
changed scope of collection instances to external