adding terminate command