refactor post manager