update the getXhr method