optimize the kill process