                                );
     eavlExecutor::Go();
     //--
-    
+
 
     //----perform reverse index
     eavlIntArray *interestingIndexes = new eavlIntArray("interestingIndexes", 

//eavl map functor
struct FindSelection
{
    eavlIntArray *checkArray;
    FindSelection(eavlIntArray *inArray) : checkArray(inArray) { }
    EAVL_FUNCTOR int operator()(int key) 
    {
        int minIndex, maxIndex, midPoint;
        minIndex = 0;
        maxIndex = checkArray->GetNumberOfTuples();
        while(maxIndex >= minIndex)
        {
            midPoint = minIndex + ((maxIndex - minIndex) / 2);
            if(checkArray->GetValue(midPoint) == key)
                return 1;
            else if(checkArray->GetValue(midPoint) < key)
                minIndex = midPoint + 1;
            else
                maxIndex = midPoint - 1;

    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()];
    #pragma omp parallel for
    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),
                                              FindSelection(constArray, chosenElements->GetNumberOfTuples())
                                             ),
                                "test if in selection"
                               );
