Changed criticalDistance to divided by aveDiam.
I wasn’t sure if Joe wanted division or addition for this line.