code rewrite + edit posts