remove references to math.random, use getObject