err check, assignPostsToCategory is sync