randomize z indices