test category function