Generating random quads