omfg I can't believe I used randint instead of random... Also updated
probability threshold, now correct