refactor post and text