updated terminate