Index: src/Actions/AnalysisAction/PairCorrelationAction.cpp
===================================================================
--- src/Actions/AnalysisAction/PairCorrelationAction.cpp	(revision 5cb3cb5366716e8e9c5de8107dd6ea020682b380)
+++ src/Actions/AnalysisAction/PairCorrelationAction.cpp	(revision e65de81ec88b9121fda86385147b35c5ae50fbfc)
@@ -41,5 +41,5 @@
   Dialog *dialog = UIFactory::getInstance().makeDialog();
 
-  dialog->queryElement("elements", ValueStorage::getInstance().getDescription("elements"));
+  dialog->queryElements("elements", ValueStorage::getInstance().getDescription("elements"));
   dialog->queryDouble("bin-start", ValueStorage::getInstance().getDescription("bin-start"));
   dialog->queryDouble("bin-width", ValueStorage::getInstance().getDescription("bin-width"));
@@ -67,5 +67,4 @@
   Vector Point;
   BinPairMap *binmap = NULL;
-  MoleculeListClass *molecules = World::getInstance().getMolecules();
 
   // obtain information
@@ -82,8 +81,9 @@
   binoutput.open(binoutputname.c_str());
   PairCorrelationMap *correlationmap = NULL;
+  std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules();
   if (periodic)
-    correlationmap = PeriodicPairCorrelation(World::getInstance().getMolecules(), elements, ranges);
+    correlationmap = PeriodicPairCorrelation(molecules, elements, ranges);
   else
-    correlationmap = PairCorrelation(World::getInstance().getMolecules(), elements);
+    correlationmap = PairCorrelation(molecules, elements);
   OutputPairCorrelation(&output, correlationmap);
   binmap = BinData( correlationmap, BinWidth, BinStart, BinEnd );
Index: src/Actions/AnalysisAction/PointCorrelationAction.cpp
===================================================================
--- src/Actions/AnalysisAction/PointCorrelationAction.cpp	(revision 5cb3cb5366716e8e9c5de8107dd6ea020682b380)
+++ src/Actions/AnalysisAction/PointCorrelationAction.cpp	(revision e65de81ec88b9121fda86385147b35c5ae50fbfc)
@@ -42,5 +42,5 @@
 
   dialog->queryVector("position", false, ValueStorage::getInstance().getDescription("position"));
-  dialog->queryElement("elements", ValueStorage::getInstance().getDescription("elements"));
+  dialog->queryElements("elements", ValueStorage::getInstance().getDescription("elements"));
   dialog->queryDouble("bin-start", ValueStorage::getInstance().getDescription("bin-start"));
   dialog->queryDouble("bin-width", ValueStorage::getInstance().getDescription("bin-width"));
@@ -68,5 +68,4 @@
   Vector Point;
   BinPairMap *binmap = NULL;
-  MoleculeListClass *molecules = World::getInstance().getMolecules();
 
   // obtain information
@@ -85,4 +84,7 @@
   cout << "Point to correlate to is  " << Point << endl;
   CorrelationToPointMap *correlationmap = NULL;
+  for(std::vector< element *>::iterator iter = elements.begin(); iter != elements.end(); ++iter)
+    cout << "element is " << (*iter)->symbol << endl;
+  std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules();
   if (periodic)
     correlationmap  = PeriodicCorrelationToPoint(molecules, elements, &Point, ranges);
Index: src/Actions/AnalysisAction/SurfaceCorrelationAction.cpp
===================================================================
--- src/Actions/AnalysisAction/SurfaceCorrelationAction.cpp	(revision 5cb3cb5366716e8e9c5de8107dd6ea020682b380)
+++ src/Actions/AnalysisAction/SurfaceCorrelationAction.cpp	(revision e65de81ec88b9121fda86385147b35c5ae50fbfc)
@@ -42,5 +42,5 @@
 
   dialog->queryMolecule("molecule-by-id", ValueStorage::getInstance().getDescription("molecule-by-id"));
-  dialog->queryElement("elements", ValueStorage::getInstance().getDescription("elements"));
+  dialog->queryElements("elements", ValueStorage::getInstance().getDescription("elements"));
   dialog->queryDouble("bin-start", ValueStorage::getInstance().getDescription("bin-start"));
   dialog->queryDouble("bin-width", ValueStorage::getInstance().getDescription("bin-width"));
@@ -68,5 +68,4 @@
   Vector Point;
   BinPairMap *binmap = NULL;
-  MoleculeListClass *molecules = World::getInstance().getMolecules();
 
   // obtain information
@@ -97,11 +96,6 @@
   const LinkedCell *LCList = NULL;
   // find biggest molecule
-  int counter  = molecules->ListOfMolecules.size();
-  bool *Actives = new bool[counter];
-  counter = 0;
-  for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
-    Actives[counter++] = (*BigFinder)->ActiveFlag;
-    (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true;
-  }
+  std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules();
+  int counter  = molecules.size();
   LCList = new LinkedCell(Boundary, LCWidth);
   FindNonConvexBorder(Boundary, TesselStruct, LCList, radius, NULL);
@@ -113,10 +107,4 @@
   delete LCList;
   OutputCorrelationToSurface(&output, surfacemap);
-  // re-set ActiveFlag
-  counter = 0;
-  for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
-    (*BigFinder)->ActiveFlag = Actives[counter++];
-  }
-  delete[] Actives;
   // check whether radius was appropriate
   {
