modified to refactor image cache