q.js implmented