removing unnecessary images