if(typeof(Promise) === "undefined") { window.Promise = Q.Promise; }