smart termination added