Does this still work if 0.001 is replaced by ```self.threshold``` ?