added basic image caching