modify categories for each post