add comment on how terminate works