added some functionality for categories