updated controller for category