changed loadJSON for xhr with joselee's fix