refactored post hashes to post objects