added overrided terminate vm
implemented terminate
added testcases