now use no more random numbers than needed in UpdateZ