added terminate() to Core