add filter function to category pills