change order of return values of random_mesh