deleting unnecessary images