implementing reference image generation