updated category and subcategory id in the query