add code to generate image for thesis.