update category retrieving function