added some grid filtering