add image cache, not finished