managing adding and editing of posts