refactor posts to include categories