changed kill logic