more spin.js porting