refactor the post page