complete spy.js