implemented filter by average value