update unfolding script