category clean function