refactoring for clean usage of Image struct