shifted xmlhttprequest object to after device initializes