added ability to load images on demand