implementing reference image generation
implementing reference image generation