added image detection function