Updated code to use the category