working code for category administration