updated collection.js