added image extraction