implemented category filtering