added kill function