changing categories to array