added avg filter case