     eavlField *inField = dataset->GetField(fieldname);
     eavlArray *arrayToOperateOn = inField->GetArray();
     eavlIntArray *mapOutput = new eavlIntArray("inSelection", 1, arrayToOperateOn->GetNumberOfTuples());
-    
-    
+
+
     //----dump interesting paticles to array that qsort can use
-    int constArray_raw[chosenElements->GetNumberOfTuples()];
+    int *constArray_raw = (int *)malloc(sizeof(int *)*chosenElements->GetNumberOfTuples());
     #pragma omp parallel for
-    for(int n = 0 ; n < chosenElements->GetNumberOfTuples(); n++ ) 
+    for(int n = 0 ; n < chosenElements->GetNumberOfTuples(); n++ )
     {
         constArray_raw[n] = chosenElements->GetValue(n);
 
     }
-        
+
     if(!presorted)
     {
         qsort(constArray_raw, chosenElements->GetNumberOfTuples(), sizeof(int), cmpfunc);
     }
-   
+
     //----put elements in const array for use in fuctor
     eavlConstArray<int> *constArray;
     INIT(eavlConstArray<int>,  constArray,  chosenElements->GetNumberOfTuples());
     //--
-    
+
     //----perform map with custom selection fuctor
     eavlExecutor::AddOperation(new_eavlMapOp( eavlOpArgs(arrayToOperateOn),
                                               eavlOpArgs(mapOutput),

        eavlExecutor::Go();
    }
    //--
    
    
    //----Create cell set from the selection
    unsigned int numnewcells = totalInterestingIds->GetValue(0);
    eavlExplicitConnectivity conn;


eavlSelectionMutator::eavlSelectionMutator()
{
    presorted = false;
}


void
eavlSelectionMutator::Execute()
{
