wrote code to generate own image