refactored image data structure