added smart edit of posts