session 1 code to generate images added