refactor post creator