updated dot kill function with variable to deactivate