Replaced CategoryList type to a dictionary to be passed. Minor change to function name