added getImage function