change function name to get_all_posts