added image handling