doc on 3drandpermute