added image removal function