Update collection.js

use "q"