added image presence test