don't forget to set thread member to null