convert to get_next_fact