Refactored testImage