added kill logic