Add a test for distort_random and adress Wolfgang's comments