Index: src/UIElements/Qt4/Query/AtomQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/AtomQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/AtomQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,6 +30,6 @@
 #include "World.hpp"
 
-QtDialog::AtomQtQuery::AtomQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::AtomQuery(_title),
+QtDialog::AtomQtQuery::AtomQtQuery(Parameter<const atom *> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::AtomQuery(param, _title),
     parent(_parent)
 {
@@ -46,5 +46,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new AtomQtQueryPipe(&tmp,_dialog, inputBox);
+  pipe = new AtomQtQueryPipe(tmp,_dialog, inputBox);
   pipe->update(inputBox->currentIndex());
   connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
Index: src/UIElements/Qt4/Query/AtomsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/AtomsQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/AtomsQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -33,6 +33,6 @@
 
 
-QtDialog::AtomsQtQuery::AtomsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::AtomsQuery(_title),
+QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::AtomsQuery(param, _title),
     parent(_parent)
 {
@@ -67,5 +67,5 @@
   thisHLayout->addLayout(thisV2Layout);
 
-  pipe = new AtomsQtQueryPipe(&tmp,_dialog,inputList);
+  pipe = new AtomsQtQueryPipe(tmp,_dialog,inputList);
   connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
   connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(add()));
Index: src/UIElements/Qt4/Query/BooleanQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/BooleanQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/BooleanQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,11 +28,14 @@
 
 
-QtDialog::BooleanQtQuery::BooleanQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
-    Dialog::BooleanQuery(_title),
+QtDialog::BooleanQtQuery::BooleanQtQuery(Parameter<bool> &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
+    Dialog::BooleanQuery(param, _title),
     parent(_parent)
 {
+  if (!param.isSet())
+    param.set(false);
   thisLayout = new QHBoxLayout();
   titleLabel = new QLabel(QString(getTitle().c_str()),_dialog);
   booleanCheckBox = new QCheckBox(QString(getTitle().c_str()), _dialog);
+  booleanCheckBox->setCheckState(param.get() ? Qt::Checked : Qt::Unchecked);
 
   parent->addLayout(thisLayout);
@@ -40,5 +43,5 @@
   thisLayout->addWidget(booleanCheckBox);
 
-  pipe = new BooleanQtQueryPipe(&tmp,_dialog,booleanCheckBox);
+  pipe = new BooleanQtQueryPipe(tmp,_dialog,booleanCheckBox);
   connect(booleanCheckBox, SIGNAL(stateChanged(int)), pipe, SLOT(update(int)));
 }
Index: src/UIElements/Qt4/Query/BoxQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/BoxQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
- * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
- */
-
-/*
- * BoxQtQuery.cpp
- *
- *  Created on: Oct 25, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <Qt/qboxlayout.h>
-#include <Qt/qlabel.h>
-#include <Qt/qtablewidget.h>
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "UIElements/Qt4/Query/QtQuery.hpp"
-#include "UIElements/Qt4/Pipe/BoxQtQueryPipe.hpp"
-
-#include "LinearAlgebra/RealSpaceMatrix.hpp"
-#include "World.hpp"
-
-QtDialog::BoxQtQuery::BoxQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::BoxQuery(_title),
-    parent(_parent)
-{
-  thisLayout = new QHBoxLayout();
-  titleLabel = new QLabel(QString(getTitle().c_str()));
-
-  // init input table
-  inputTable = new QTableWidget(3,3, _dialog);
-  QStringList CoordinateList;
-  CoordinateList << "x" << "y" << "z";
-  inputTable->setHorizontalHeaderLabels(CoordinateList);
-  inputTable->setVerticalHeaderLabels(CoordinateList);
-
-  pipe = new BoxQtQueryPipe(tmp,_dialog, inputTable);
-
-  // fill the box with current matrix
-  const RealSpaceMatrix &domain = World::getInstance().getDomain().getM();
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++) {
-      QTableWidgetItem *newItem = new QTableWidgetItem(tr("%1").arg(domain.at(i,j)));
-      inputTable->setItem(i,j,newItem);
-      pipe->update(i,j);
-    }
-
-  parent->addLayout(thisLayout);
-  thisLayout->addWidget(titleLabel);
-  thisLayout->addWidget(inputTable);
-
-  connect(inputTable,SIGNAL(cellChanged(int,int)),pipe,SLOT(update(int,int)));
-}
-
-QtDialog::BoxQtQuery::~BoxQtQuery()
-{
-  delete pipe;
-}
-
-bool QtDialog::BoxQtQuery::handle() {
-  return true;
-}
-
-
Index: src/UIElements/Qt4/Query/DoubleQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/DoubleQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/DoubleQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,12 +28,14 @@
 
 
-QtDialog::DoubleQtQuery::DoubleQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::DoubleQuery(title),
+QtDialog::DoubleQtQuery::DoubleQtQuery(Parameter<double> &param, std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::DoubleQuery(param, title),
     parent(_parent)
 {
+  if (!param.isSet())
+    param.set(0.0);
   thisLayout = new QHBoxLayout();
   titleLabel = new QLabel(QString(getTitle().c_str()));
   inputBox = new QDoubleSpinBox();
-  inputBox->setValue(0);
+  inputBox->setValue(param.get());
   inputBox->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
   inputBox->setDecimals(3);
@@ -42,5 +44,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new DoubleQtQueryPipe(&tmp,_dialog);
+  pipe = new DoubleQtQueryPipe(tmp,_dialog);
   pipe->update(inputBox->value());
   connect(inputBox,SIGNAL(valueChanged(double)),pipe,SLOT(update(double)));
Index: src/UIElements/Qt4/Query/DoublesQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/DoublesQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/DoublesQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,6 +30,6 @@
 
 
-QtDialog::DoublesQtQuery::DoublesQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::DoublesQuery(title),
+QtDialog::DoublesQtQuery::DoublesQtQuery(Parameter<std::vector<double> > &param, std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::DoublesQuery(param, title),
     parent(_parent)
 {
@@ -60,5 +60,5 @@
   thisHLayout->addLayout(thisV2Layout);
 
-  pipe = new QtQueryListPipe<double>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
+  pipe = new QtQueryListPipe<double>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
   connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
   connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
Index: src/UIElements/Qt4/Query/ElementQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/ElementQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/ElementQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 #include "World.hpp"
 
-QtDialog::ElementQtQuery::ElementQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
-    Dialog::ElementQuery(_title),
+QtDialog::ElementQtQuery::ElementQtQuery(Parameter<const element *> &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
+    Dialog::ElementQuery(param, _title),
     parent(_parent)
 {
@@ -51,5 +51,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new ElementQtQueryPipe(&tmp,_dialog,inputBox);
+  pipe = new ElementQtQueryPipe(tmp,_dialog,inputBox);
   pipe->update(inputBox->currentIndex());
   connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
Index: src/UIElements/Qt4/Query/ElementsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/ElementsQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/ElementsQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -32,6 +32,6 @@
 
 
-QtDialog::ElementsQtQuery::ElementsQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
-    Dialog::ElementsQuery(_title),
+QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
+    Dialog::ElementsQuery(param, _title),
     parent(_parent)
 {
@@ -52,5 +52,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new ElementsQtQueryPipe(&tmp,_dialog,inputBox);
+  pipe = new ElementsQtQueryPipe(tmp,_dialog,inputBox);
   pipe->update(inputBox->currentIndex());
   connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
Index: src/UIElements/Qt4/Query/FileQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/FileQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/FileQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -29,6 +29,6 @@
 
 
-QtDialog::FileQtQuery::FileQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
-    Dialog::FileQuery(_title),
+QtDialog::FileQtQuery::FileQtQuery(Parameter<boost::filesystem::path> &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
+    Dialog::FileQuery(param, _title),
     parent(_parent)
 {
@@ -43,5 +43,5 @@
   filedialogButton = new QPushButton("&Choose", _dialog);
 
-  pipe = new FileQtQueryPipe(&tmp,_dialog,filenameLineEdit,filedialogButton);
+  pipe = new FileQtQueryPipe(tmp,_dialog,filenameLineEdit,filedialogButton);
 
   thisLayout = new QHBoxLayout();
Index: src/UIElements/Qt4/Query/FilesQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/FilesQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/FilesQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -26,10 +26,12 @@
 #include "CodePatterns/MemDebug.hpp"
 
+#include <boost/filesystem/path.hpp>
+
 #include "UIElements/Qt4/Query/QtQuery.hpp"
 #include "UIElements/Qt4/Pipe/QtQueryListPipe.hpp"
 
 
-QtDialog::FilesQtQuery::FilesQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
-    Dialog::FilesQuery(_title),
+QtDialog::FilesQtQuery::FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
+    Dialog::FilesQuery(param, _title),
     parent(_parent)
 {
@@ -60,5 +62,5 @@
   thisHLayout->addLayout(thisV2Layout);
 
-  pipe = new QtQueryListPipe<boost::filesystem::path>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
+  pipe = new QtQueryListPipe<boost::filesystem::path>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
   connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
   connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
Index: src/UIElements/Qt4/Query/IntQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/IntQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/IntQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,17 +28,19 @@
 
 
-QtDialog::IntQtQuery::IntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::IntQuery(_title),
+QtDialog::IntQtQuery::IntQtQuery(Parameter<int> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::IntQuery(param, _title),
     parent(_parent)
 {
+  if (!param.isSet())
+    param.set(0);
   thisLayout = new QHBoxLayout();
   titleLabel = new QLabel(QString(getTitle().c_str()));
   inputBox = new QSpinBox();
-  inputBox->setValue(0);
+  inputBox->setValue(param.get());
   parent->addLayout(thisLayout);
   thisLayout->addWidget(titleLabel);
   thisLayout->addWidget(inputBox);
 
-  pipe = new IntQtQueryPipe(&tmp,_dialog);
+  pipe = new IntQtQueryPipe(tmp,_dialog);
   pipe->update(inputBox->value());
   connect(inputBox,SIGNAL(valueChanged(int)),pipe,SLOT(update(int)));
Index: src/UIElements/Qt4/Query/IntsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/IntsQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/IntsQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,6 +30,6 @@
 
 
-QtDialog::IntsQtQuery::IntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::IntsQuery(_title),
+QtDialog::IntsQtQuery::IntsQtQuery(Parameter<std::vector<int> > &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::IntsQuery(param, _title),
     parent(_parent)
 {
@@ -60,5 +60,5 @@
   thisHLayout->addLayout(thisV2Layout);
 
-  pipe = new QtQueryListPipe<int>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
+  pipe = new QtQueryListPipe<int>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
   connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
   connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
Index: src/UIElements/Qt4/Query/MoleculeQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/MoleculeQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/MoleculeQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 
 
-QtDialog::MoleculeQtQuery::MoleculeQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::MoleculeQuery(_title),
+QtDialog::MoleculeQtQuery::MoleculeQtQuery(Parameter<const molecule *> &param, std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::MoleculeQuery(param, _title),
     parent(_parent)
 {
@@ -51,5 +51,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new MoleculeQtQueryPipe(&tmp,_dialog,inputBox);
+  pipe = new MoleculeQtQueryPipe(tmp,_dialog,inputBox);
   pipe->update(inputBox->currentIndex());
   connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
Index: src/UIElements/Qt4/Query/MoleculesQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/MoleculesQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/MoleculesQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 
 
-QtDialog::MoleculesQtQuery::MoleculesQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::MoleculesQuery(_title),
+QtDialog::MoleculesQtQuery::MoleculesQtQuery(Parameter<std::vector<const molecule *> > &param, std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::MoleculesQuery(param, _title),
     parent(_parent)
 {
@@ -51,5 +51,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new MoleculesQtQueryPipe(&tmp,_dialog,inputBox);
+  pipe = new MoleculesQtQueryPipe(tmp,_dialog,inputBox);
   pipe->update(inputBox->currentIndex());
   connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
Index: src/UIElements/Qt4/Query/QtQuery.hpp
===================================================================
--- src/UIElements/Qt4/Query/QtQuery.hpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/QtQuery.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -16,4 +16,5 @@
 
 #include "Qt4/QtDialog.hpp"
+#include "Parameters/Parameter.hpp"
 
 class QHBoxLayout;
@@ -36,5 +37,5 @@
 class AtomsQtQueryPipe;
 class BooleanQtQueryPipe;
-class BoxQtQueryPipe;
+class RealSpaceMatrixQtQueryPipe;
 class DoubleQtQueryPipe;
 class DoublesQtQueryPipe;
@@ -43,4 +44,5 @@
 class EmptyQtQueryPipe;
 class FileQtQueryPipe;
+class FilesQtQueryPipe;
 class IntQtQueryPipe;
 class MoleculeQtQueryPipe;
@@ -56,5 +58,5 @@
 class QtDialog::AtomQtQuery : public Dialog::AtomQuery {
 public:
-  AtomQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  AtomQtQuery(Parameter<const atom *> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~AtomQtQuery();
   virtual bool handle();
@@ -70,5 +72,5 @@
 class QtDialog::AtomsQtQuery : public Dialog::AtomsQuery {
 public:
-  AtomsQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  AtomsQtQuery(Parameter<std::vector<const atom *> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~AtomsQtQuery();
   virtual bool handle();
@@ -85,5 +87,5 @@
 class QtDialog::BooleanQtQuery : public Dialog::BooleanQuery {
 public:
-  BooleanQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
+  BooleanQtQuery(Parameter<bool> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~BooleanQtQuery();
   virtual bool handle();
@@ -97,8 +99,8 @@
 };
 
-class QtDialog::BoxQtQuery : public Dialog::BoxQuery {
-public:
-  BoxQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
-  virtual ~BoxQtQuery();
+class QtDialog::RealSpaceMatrixQtQuery : public Dialog::RealSpaceMatrixQuery {
+public:
+  RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  virtual ~RealSpaceMatrixQtQuery();
   virtual bool handle();
 private:
@@ -108,10 +110,10 @@
   QTableWidget *inputTable;
 
-  BoxQtQueryPipe *pipe;
+  RealSpaceMatrixQtQueryPipe *pipe;
 };
 
 class QtDialog::DoubleQtQuery : public Dialog::DoubleQuery {
 public:
-  DoubleQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog);
+  DoubleQtQuery(Parameter<double> &, std::string title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~DoubleQtQuery();
   virtual bool handle();
@@ -127,5 +129,5 @@
 class QtDialog::DoublesQtQuery : public Dialog::DoublesQuery {
 public:
-  DoublesQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog);
+  DoublesQtQuery(Parameter<std::vector<double> > &, std::string title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~DoublesQtQuery();
   virtual bool handle();
@@ -141,5 +143,5 @@
 class QtDialog::ElementQtQuery : public Dialog::ElementQuery {
 public:
-  ElementQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
+  ElementQtQuery(Parameter<const element *> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~ElementQtQuery();
   virtual bool handle();
@@ -155,5 +157,5 @@
 class QtDialog::ElementsQtQuery : public Dialog::ElementsQuery {
 public:
-  ElementsQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
+  ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~ElementsQtQuery();
   virtual bool handle();
@@ -182,5 +184,5 @@
 class QtDialog::FileQtQuery : public Dialog::FileQuery {
 public:
-  FileQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
+  FileQtQuery(Parameter<boost::filesystem::path> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~FileQtQuery();
   virtual bool handle();
@@ -197,5 +199,5 @@
 class QtDialog::FilesQtQuery : public Dialog::FilesQuery {
 public:
-  FilesQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
+  FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~FilesQtQuery();
   virtual bool handle();
@@ -214,5 +216,5 @@
 class QtDialog::IntQtQuery : public Dialog::IntQuery {
 public:
-  IntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
+  IntQtQuery(Parameter<int> &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~IntQtQuery();
   virtual bool handle();
@@ -228,5 +230,5 @@
 class QtDialog::IntsQtQuery : public Dialog::IntsQuery {
 public:
-  IntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
+  IntsQtQuery(Parameter<std::vector<int> > &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~IntsQtQuery();
   virtual bool handle();
@@ -245,5 +247,5 @@
 class QtDialog::MoleculeQtQuery : public Dialog::MoleculeQuery {
 public:
-  MoleculeQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  MoleculeQtQuery(Parameter<const molecule *> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~MoleculeQtQuery();
   virtual bool handle();
@@ -259,5 +261,5 @@
 class QtDialog::MoleculesQtQuery : public Dialog::MoleculesQuery {
 public:
-  MoleculesQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~MoleculesQtQuery();
   virtual bool handle();
@@ -273,5 +275,5 @@
 class QtDialog::StringQtQuery : public Dialog::StringQuery {
 public:
-  StringQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  StringQtQuery(Parameter<std::string> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~StringQtQuery();
   virtual bool handle();
@@ -287,5 +289,5 @@
 class QtDialog::StringsQtQuery : public Dialog::StringsQuery {
 public:
-  StringsQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~StringsQtQuery();
   virtual bool handle();
@@ -301,5 +303,5 @@
 class QtDialog::UnsignedIntQtQuery : public Dialog::UnsignedIntQuery {
 public:
-  UnsignedIntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
+  UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~UnsignedIntQtQuery();
   virtual bool handle();
@@ -315,5 +317,5 @@
 class QtDialog::UnsignedIntsQtQuery : public Dialog::UnsignedIntsQuery {
 public:
-  UnsignedIntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
+  UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~UnsignedIntsQtQuery();
   virtual bool handle();
@@ -333,5 +335,5 @@
 class QtDialog::VectorQtQuery : public Dialog::VectorQuery {
 public:
-  VectorQtQuery(std::string title,bool _check,QBoxLayout *,QtDialog *);
+  VectorQtQuery(Parameter<Vector> &, std::string title,bool _check,QBoxLayout *,QtDialog *);
   virtual ~VectorQtQuery();
   virtual bool handle();
@@ -352,5 +354,5 @@
 class QtDialog::VectorsQtQuery : public Dialog::VectorsQuery {
 public:
-  VectorsQtQuery(std::string title,bool _check,QBoxLayout *,QtDialog *);
+  VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string title,bool _check,QBoxLayout *,QtDialog *);
   virtual ~VectorsQtQuery();
   virtual bool handle();
@@ -369,5 +371,5 @@
 class QtDialog::RandomNumberDistribution_ParametersQtQuery : public Dialog::RandomNumberDistribution_ParametersQuery {
 public:
-  RandomNumberDistribution_ParametersQtQuery(std::string title,QBoxLayout *,QtDialog *);
+  RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *,QtDialog *);
   virtual ~RandomNumberDistribution_ParametersQtQuery();
   virtual bool handle();
Index: src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 #include "World.hpp"
 
-QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::RandomNumberDistribution_ParametersQuery(_title),
+QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::RandomNumberDistribution_ParametersQuery(param, _title),
     parent(_parent)
 {
@@ -50,5 +50,5 @@
   okButton = new QPushButton(tr("Ok"));
 
-  pipe = new RandomNumberDistribution_ParametersQtQueryPipe(&tmp,_dialog, inputBox);
+  pipe = new RandomNumberDistribution_ParametersQtQueryPipe(tmp,_dialog, inputBox);
   connect(okButton,SIGNAL(clicked()),pipe,SLOT(update()));
 }
Index: src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
+++ src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -0,0 +1,73 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * BoxQtQuery.cpp
+ *
+ *  Created on: Oct 25, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <Qt/qboxlayout.h>
+#include <Qt/qlabel.h>
+#include <Qt/qtablewidget.h>
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "UIElements/Qt4/Query/QtQuery.hpp"
+#include "UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.hpp"
+
+#include "LinearAlgebra/RealSpaceMatrix.hpp"
+#include "World.hpp"
+
+QtDialog::RealSpaceMatrixQtQuery::RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::RealSpaceMatrixQuery(param, _title),
+    parent(_parent)
+{
+  thisLayout = new QHBoxLayout();
+  titleLabel = new QLabel(QString(getTitle().c_str()));
+
+  // init input table
+  inputTable = new QTableWidget(3,3, _dialog);
+  QStringList CoordinateList;
+  CoordinateList << "x" << "y" << "z";
+  inputTable->setHorizontalHeaderLabels(CoordinateList);
+  inputTable->setVerticalHeaderLabels(CoordinateList);
+
+  pipe = new RealSpaceMatrixQtQueryPipe(tmp,_dialog, inputTable);
+
+  // fill the box with current matrix
+  const RealSpaceMatrix &domain = World::getInstance().getDomain().getM();
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++) {
+      QTableWidgetItem *newItem = new QTableWidgetItem(tr("%1").arg(domain.at(i,j)));
+      inputTable->setItem(i,j,newItem);
+      pipe->update(i,j);
+    }
+
+  parent->addLayout(thisLayout);
+  thisLayout->addWidget(titleLabel);
+  thisLayout->addWidget(inputTable);
+
+  connect(inputTable,SIGNAL(cellChanged(int,int)),pipe,SLOT(update(int,int)));
+}
+
+QtDialog::RealSpaceMatrixQtQuery::~RealSpaceMatrixQtQuery()
+{
+  delete pipe;
+}
+
+bool QtDialog::RealSpaceMatrixQtQuery::handle() {
+  return true;
+}
+
+
Index: src/UIElements/Qt4/Query/StringQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/StringQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/StringQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,8 +28,10 @@
 
 
-QtDialog::StringQtQuery::StringQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::StringQuery(_title),
+QtDialog::StringQtQuery::StringQtQuery(Parameter<std::string> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::StringQuery(param, _title),
     parent(_parent)
 {
+  if (!param.isSet())
+    param.set("");
   thisLayout = new QHBoxLayout();
   titleLabel = new QLabel(QString(getTitle().c_str()));
@@ -39,5 +41,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new StringQtQueryPipe(&tmp,_dialog);
+  pipe = new StringQtQueryPipe(tmp,_dialog);
   pipe->update(inputBox->text());
   connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(update(const QString&)));
@@ -52,5 +54,5 @@
 bool QtDialog::StringQtQuery::handle()
 {
-  return tmp!="";
+  return tmp.get() != "";
 }
 
Index: src/UIElements/Qt4/Query/StringsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/StringsQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/StringsQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,6 +30,6 @@
 
 
-QtDialog::StringsQtQuery::StringsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::StringsQuery(_title),
+QtDialog::StringsQtQuery::StringsQtQuery(Parameter<std::vector<std::string> > &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::StringsQuery(param, _title),
     parent(_parent)
 {
@@ -60,5 +60,5 @@
   thisHLayout->addLayout(thisV2Layout);
 
-  pipe = new QtQueryListPipe<std::string>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
+  pipe = new QtQueryListPipe<std::string>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
   connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
   connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
@@ -76,12 +76,14 @@
   // dissect by ","
   std::string::iterator olditer = temp.begin();
+  std::vector<std::string> temp_strings;
   for(std::string::iterator iter = temp.begin(); iter != temp.end(); ++iter) {
     if (*iter == ' ') {
-      tmp.push_back(std::string(iter, olditer));
+      temp_strings.push_back(std::string(iter, olditer));
       olditer = iter;
     }
   }
   if (olditer != temp.begin())  // insert last part also
-    tmp.push_back(std::string(olditer, temp.end()));
+    temp_strings.push_back(std::string(olditer, temp.end()));
+  tmp.set(temp_strings);
 
   return temp!="";
Index: src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,17 +28,19 @@
 
 
-QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::UnsignedIntQuery(_title),
+QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(Parameter<unsigned int> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::UnsignedIntQuery(param, _title),
     parent(_parent)
 {
+  if (!param.isSet())
+    param.set(0);
   thisLayout = new QHBoxLayout();
   titleLabel = new QLabel(QString(getTitle().c_str()));
   inputBox = new QSpinBox();
-  inputBox->setValue(0);
+  inputBox->setValue(param.get());
   parent->addLayout(thisLayout);
   thisLayout->addWidget(titleLabel);
   thisLayout->addWidget(inputBox);
 
-  pipe = new UnsignedIntQtQueryPipe(&tmp,_dialog);
+  pipe = new UnsignedIntQtQueryPipe(tmp,_dialog);
   pipe->update(inputBox->value());
   connect(inputBox,SIGNAL(valueChanged(unsigned int)),pipe,SLOT(update(unsigned int)));
Index: src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,6 +30,6 @@
 
 
-QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::UnsignedIntsQuery(_title),
+QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::UnsignedIntsQuery(param, _title),
     parent(_parent)
 {
@@ -60,5 +60,5 @@
   thisHLayout->addLayout(thisV2Layout);
 
-  pipe = new QtQueryListPipe<unsigned int>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
+  pipe = new QtQueryListPipe<unsigned int>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
   connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
   connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
Index: src/UIElements/Qt4/Query/VectorQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/VectorQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/VectorQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -29,8 +29,10 @@
 
 
-QtDialog::VectorQtQuery::VectorQtQuery(std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::VectorQuery(title,_check),
+QtDialog::VectorQtQuery::VectorQtQuery(Parameter<Vector> &param, std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::VectorQuery(param, title,_check),
     parent(_parent)
 {
+  if (!param.isSet())
+    param.set(Vector(0,0,0));
   mainLayout= new QHBoxLayout();
   titleLabel = new QLabel(QString(getTitle().c_str()));
@@ -45,4 +47,5 @@
   coordInputX = new QDoubleSpinBox();
   coordInputX->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
+  coordInputX->setValue(param.get()[0]);
 //  coordInputX->setRange(0,M.at(i,i));
   coordInputX->setDecimals(3);
@@ -50,4 +53,5 @@
   coordInputY = new QDoubleSpinBox();
   coordInputY->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
+  coordInputY->setValue(param.get()[1]);
 //  coordInputY->setRange(0,M.at(i,i));
   coordInputY->setDecimals(3);
@@ -55,8 +59,9 @@
   coordInputZ = new QDoubleSpinBox();
   coordInputZ->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
+  coordInputZ->setValue(param.get()[2]);
 //  coordInputZ->setRange(0,M.at(i,i));
   coordInputZ->setDecimals(3);
   coordLayout->addWidget(coordInputZ);
-  pipe = new VectorQtQueryPipe(&(tmp),_dialog,inputBox);
+  pipe = new VectorQtQueryPipe(tmp,_dialog,inputBox);
   //pipe->update(coordInput->value());
   connect(coordInputX,SIGNAL(valueChanged(double)),pipe,SLOT(updateX(double)));
Index: src/UIElements/Qt4/Query/VectorsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/VectorsQtQuery.cpp	(revision 2c5765fc2598fb70685cc0ead59e118f3df88b1c)
+++ src/UIElements/Qt4/Query/VectorsQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -29,6 +29,6 @@
 
 
-QtDialog::VectorsQtQuery::VectorsQtQuery(std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::VectorsQuery(title,_check),
+QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > &param, std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::VectorsQuery(param, title,_check),
     parent(_parent)
 {
@@ -47,5 +47,5 @@
   coordInput->setDecimals(3);
   coordLayout->addWidget(coordInput);
-  pipe = new VectorsQtQueryPipe(&(tmp),_dialog,inputBox);
+  pipe = new VectorsQtQueryPipe(tmp,_dialog,inputBox);
   //pipe->update(coordInput->value());
   connect(coordInput,SIGNAL(valueChanged(double)),pipe,SLOT(update(double)));
