use xhr to fetch resources