Modified for easier image generation.