put var in front of category
only add category to the data collection if it exists