removing unneeded images