added terminate