Incorporated the Permute rows method.