corrected code for images