Update XHRfactory.js