main.js
function(text){
            var deferred = Q.defer();
            r.question(text, function(answer) {
                deferred.resolve(answer);
            });
            return deferred.promise;
        }
function(text){
            var deferred = Q.defer();
            r.question(text, function(answer) {
                deferred.resolve(answer);
            });
            return deferred.promise;
        }
function ( text ) { var deferred = Q . defer ( ) ; r . question ( text , function ( answer ) { deferred . resolve ( answer ) ; } ) ; return deferred . promise ; }
transfer the question funtion to a promised function
transfer the question funtion to a promised function