tran then.js to coffee style for study