remove references to math.random