improved killing algoithm