adding a method to get a cached image