spin.coffee to handle spinner function