refactor category-post