modified RandomAndMCExercises