added onload callback on XMLHttpRequests