modified loadFromUrl for test