add filter according to group