added image caching