changed logic for getting a single category