update with taking categories of each post