added get_latest_post function to thread