exercise a1 - refactoring on image io