moved storeImage methods to new utility class