sync --> async

changed XMLHttpRequest