Index: graph_displayer_canvas.cc
===================================================================
--- graph_displayer_canvas.cc	(revision 98)
+++ graph_displayer_canvas.cc	(revision 118)
@@ -60,7 +60,7 @@
 }
 
-void GraphDisplayerCanvas::propertyUpdate(Node node, int prop, int dummy)
-{
-  dummy=dummy;
+void GraphDisplayerCanvas::propertyUpdate(Node node, int prop)
+{
+  //dummy=dummy;
 
   std::string mapname=mytab.getActiveNodeMap(prop);
@@ -107,7 +107,7 @@
 }
 
-void GraphDisplayerCanvas::propertyUpdate(Edge edge, int prop, int dummy)
-{
-  dummy=dummy;
+void GraphDisplayerCanvas::propertyUpdate(Edge edge, int prop)
+{
+  //dummy=dummy;
 
   std::string mapname=mytab.getActiveEdgeMap(prop);
Index: graph_displayer_canvas.h
===================================================================
--- graph_displayer_canvas.h	(revision 98)
+++ graph_displayer_canvas.h	(revision 118)
@@ -17,65 +17,178 @@
   friend class BrokenEdge;
 
+  ///Edge displayer class
+
+  ///This class is responsible for displaying edges in graph.
+  ///The displayed edge is broken in the middle. The
+  ///aim of this is to be able to indicate direction of edges
+  ///and to be able to display more then one edges between the
+  ///same source and target
   class BrokenEdge : public Gnome::Canvas::Line
   {
+    ///The edge that the class displays.
+
+    ///It is needed, because some datas needed from
+    ///graph can be accessed by this or should be sent
+    ///as parameter, but it would be complicated
     Edge edge;
+
+    ///Reference to the canvas, on which the graph is drawn.
+
+    ///It is needed, because some datas needed from
+    ///graph can be accessed by this or should be sent
+    ///as parameter, but it would be complicated
     GraphDisplayerCanvas & gdc;
+
+    ///An arrow that indicates the direction of the edges
+
+    ///in case of directional graph direction can be indicated
+    ///by this polygon. The polygon formulates a red arrow.
     Gnome::Canvas::Polygon * arrow;
 
-    ///Indicates whether the button of mouse is pressed or not
+    ///Indicates whether the button of mouse is pressed or not at the moment.
     bool isbutton;
 
-    ///At this location was the mousebutton pressed.
-    ///It helps to calculate the distance of dragging.
-    double clicked_x, clicked_y;
-
-    ///event handler for forming edges
-    bool edgeFormerEventHandler(GdkEvent*);
+    ///At this location was the mousebutton pressed. Horizontal component.
+
+    ///It helps to calculate the
+    ///distance of dragging.
+    double clicked_x;
+
+    ///At this location was the mousebutton pressed. Vertical component.
+
+    ///It helps to calculate the
+    ///distance of dragging.
+    double clicked_y;
+
+    ///event handler for forming broken edges
+
+    ///\param event the
+    ///event to handle
+    bool edgeFormerEventHandler(GdkEvent* event);
   public:
-    BrokenEdge(Gnome::Canvas::Group &, Edge, GraphDisplayerCanvas &);
+
+    ///Constructor of broken edge class.
+
+    ///\param g the group to which the edge belongs
+    ///\param _edge the represented edge
+    ///\param gc the canvas
+    BrokenEdge(Gnome::Canvas::Group & g, Edge _edge, GraphDisplayerCanvas & gc);
+
+    ///Destructor of broken edge class
+
+    ///Frees up
+    ///reserved memory
     ~BrokenEdge();
+
+    ///The function that draws the edge based on collected data
     void draw();
   };
+
+  ///Type of canvas, on which the graph is drawn
   typedef Gnome::Canvas::CanvasAA Parent;
 
 public:
-  GraphDisplayerCanvas(NoteBookTab &);
+  ///Constructor
+
+  ///\param nbt the tab of the window, in which the graph is displayed
+  GraphDisplayerCanvas(NoteBookTab & nbt);
+
+  ///destructor of the class
   virtual ~GraphDisplayerCanvas();
 
-  ///Changes the linewidth attribute according to the given map.
-  ///\param mapname is the name of the map which contains the new values
-  int changeEdgeWidth (std::string mapname, Edge new_item=INVALID);
-  int resetEdgeWidth (Edge new_item=INVALID);
-
-  ///Changes the linecolor attribute according to the given map.
-  ///\param mapname is the name of the map which contains the new values
-  int changeEdgeColor (std::string mapname, Edge new_item=INVALID);
-  int resetEdgeColor (Edge new_item=INVALID);
-
-  ///Changes the text of line attribute according to the given map.
-  ///\param mapname is the name of the map which contains the new values
-  int changeEdgeText (std::string mapname, Edge new_item=INVALID);
-  int resetEdgeText (Edge new_item=INVALID);
-
-  ///Changes the linewidth attribute according to the given map.
-  ///\param mapname is the name of the map which contains the new values
-  int changeNodeRadius (std::string mapname, Node new_item=INVALID);
-  int resetNodeRadius (Node new_item=INVALID);
-
-  ///Changes the linecolor attribute according to the given map.
-  ///\param mapname is the name of the map which contains the new values
-  int changeNodeColor (std::string mapname, Node new_item=INVALID);
-  int resetNodeColor (Node new_item=INVALID);
-
-  ///Changes the text of line attribute according to the given map.
-  ///\param mapname is the name of the map which contains the new values
-  int changeNodeText (std::string mapname, Node new_item=INVALID);
-  int resetNodeText (Node new_item=INVALID);
-
-  void propertyChange(bool, int);
-  void propertyUpdate(Edge, int, int dummy=0);
-  void propertyUpdate(Node, int, int dummy=0);
-
+  ///Changes the width of edge(s) according to the given map.
+
+  ///\param mapname is the name of the map which contains the values to be set
+  ///\param edge if it is given, only the width of the given edge will be set, instead of all of them.
+  int changeEdgeWidth (std::string mapname, Edge edge=INVALID);
+
+  ///Resets width of edge(s) to the default value
+
+  ///\param edge if it is given, only the width of the
+  ///given edge will be reset, instead of all of them.
+  int resetEdgeWidth (Edge edge=INVALID);
+
+  ///Changes the color of edge(s) according to the given map.
+
+  ///\param mapname is the name of the map which contains the new values
+  ///\param edge if it is given, only the color of the given edge will be set, instead of all of them.
+  int changeEdgeColor (std::string mapname, Edge edge=INVALID);
+
+  ///Resets color of edge(s) to the default value
+
+  ///\param edge if it is given, only the color of the
+  ///given edge will be reset, instead of all of them.
+  int resetEdgeColor (Edge edge=INVALID);
+
+  ///Changes the label of edge(s) according to the given map.
+
+  ///\param mapname is the name of the map which contains the new values
+  ///\param edge if it is given, only the label of the given edge will be set, instead of all of them.
+  int changeEdgeText (std::string mapname, Edge edge=INVALID);
+
+  ///Resets label of edge(s) to the default value
+
+  ///\param edge if it is given, only the color of the
+  ///given edge will be reset, instead of all of them.
+  int resetEdgeText (Edge edge=INVALID);
+
+  ///Changes the radius of node(s) according to the given map.
+
+  ///\param mapname is the name of the map which contains the new values
+  ///\param node if it is given, only the radius of the given node will be set, instead of all of them.
+  int changeNodeRadius (std::string mapname, Node node=INVALID);
+
+  ///Resets radius of node(s) to the default value
+
+  ///\param node if it is given, only the radius of the
+  ///given node will be reset, instead of all of them.
+  int resetNodeRadius (Node node=INVALID);
+
+  ///Changes the color of node(s) according to the given map.
+
+  ///\param mapname is the name of the map which contains the new values
+  ///\param node if it is given, only the color of the given node will be set, instead of all of them.
+  int changeNodeColor (std::string mapname, Node node=INVALID);
+
+  ///Resets color of node(s) to the default value
+
+  ///\param node if it is given, only the color of the
+  ///given node will be reset, instead of all of them.
+  int resetNodeColor (Node node=INVALID);
+
+  ///Changes the label of node(s) according to the given map.
+
+  ///\param mapname is the name of the map which contains the new values
+  ///\param node if it is given, only the label of the given node will be set, instead of all of them.
+  int changeNodeText (std::string mapname, Node node=INVALID);
+
+  ///Resets label of node(s) to the default value
+
+  ///\param node if it is given, only the label of the
+  ///given node will be reset, instead of all of them.
+  int resetNodeText (Node node=INVALID);
+
+  ///This function is called, when any of the displayed attributes have to be updated, or changed
+
+  ///\param itisedge if true, edge property has to be changed, else node property
+  ///\param prop the id of property that has to changed or updated
+  void propertyChange(bool itisedge, int prop);
+
+  ///updates the given property
+
+  ///\param edge if it is not INVALID, only the property of the given edge will be updated, instead of all of them
+  ///\param prop the property to update
+  void propertyUpdate(Edge edge, int prop);
+
+  ///updates the given property
+
+  ///\param node if it is not INVALID, only the property of the given node will be updated, instead of all of them
+  ///\param prop the property to update
+  void propertyUpdate(Node node, int prop);
+
+  ///updates all the property for the given edge
   void propertyUpdate(Edge);
+
+  ///updates all the property for the given node
   void propertyUpdate(Node);
 
@@ -96,5 +209,5 @@
 protected:
 
-  //maximizing, minimizing, restoring window, etc. 
+  //maximizing, minimizing, restoring window, etc.
   virtual bool on_expose_event(GdkEventExpose *);
 
@@ -128,9 +241,10 @@
   ///Moves the text to new place
   void textReposition(xy<double>);
+
   ///Activates an edge belonging to a BrokenEdge
-  ///
+
   ///After we have activated an edge this way,
   ///the GDC object will know, which edge is under forming
-  ///therefore it can redraw the necessarz elementy on the canvas,
+  ///therefore it can redraw the necessary elements on the canvas,
   ///for example the text belonging to the \ref BrokenEdge can be
   ///redrawn (\ref textReposition).
@@ -138,14 +252,29 @@
 
 public:
-  ///\return the actual tool in hand
+
+  ///Returns the actual tool in hand
   int getActualTool();
 
+  ///draws the graph
+
+  ///Called when opening a file.
   void drawGraph();
+
+  ///Clears the canvas
+
+  ///It achieves this by deleting all data
+  ///structure used to help handle the displayed graph.
   void clear();
 
   ///creates a new Nodemap
-  int addNewNodeMap(double,std::string);
+
+  ///\param init initial value of the map
+  ///\param mapname name of new map
+  int addNewNodeMap(double init,std::string mapname);
   ///creates a new Edgemap
-  int addNewEdgeMap(double,std::string);
+
+  ///\param init initial value of the map
+  ///\param mapname name of new map
+  int addNewEdgeMap(double init,std::string mapname);
 
 private:
@@ -184,13 +313,35 @@
 
   ///Remembers which Gnome::Canvas::Item was pressed.
-  ///this variable is needed, because
-  ///1. we cannot query the item at he cursor as fast as it could not cause a Segmentation Fault
-  ///2. we would like to handle only ony item per movement, therefore quering it is not a working solution
-  Gnome::Canvas::Item * active_item, * target_item;
+
+  ///this variable is needed, to work on it after selection
+  Gnome::Canvas::Item * active_item;
+
+  ///Remembers which Gnome::Canvas::Item was pressed.
+
+  ///this variable is used at edge creation, it will
+  ///be the secondly selected node. No local variable
+  ///can be used for this purpose inside the function,
+  ///because the node selected by button press, and
+  ///the edge is created by button release. Both of
+  ///them is different function call.
+  Gnome::Canvas::Item * target_item;
+
+  ///selected node (for any editing)
   Node active_node;
+
+  ///selected edge (for any editing)
   Edge active_edge;
+
+  ///the edge that is selected by clicking on the red arrow in the middle of it
+
+  ///This edge is stored only for the purpose of reshape it.
+  ///That is why it is selected in a different manner.
   Edge forming_edge;
 
-  std::string nodemap_to_edit, edgemap_to_edit;
+  ///Map displayed by label can be edited.
+  std::string nodemap_to_edit;
+
+  ///Map displayed by label can be edited.
+  std::string edgemap_to_edit;
 
   static const int zoom_step = 5;
@@ -198,5 +349,5 @@
 private:
 
-  ///reference to the parent window
+  ///reference to the container, in which the canvas is
   NoteBookTab & mytab;
 
Index: mapstorage.cc
===================================================================
--- mapstorage.cc	(revision 111)
+++ mapstorage.cc	(revision 118)
@@ -52,6 +52,7 @@
 }
 
-int MapStorage::addNodeMap(const std::string & name, Graph::NodeMap<double> *nodemap, double default_value = 0.0)
-{
+int MapStorage::addNodeMap(const std::string & name, Graph::NodeMap<double> *nodemap, double default_value)
+{
+  std::cout << default_value << std::endl;
   if( nodemap_storage.find(name) == nodemap_storage.end() )
     {
@@ -123,5 +124,5 @@
 }
 
-int MapStorage::addEdgeMap(const std::string & name, Graph::EdgeMap<double> *edgemap, double default_value = 0.0)
+int MapStorage::addEdgeMap(const std::string & name, Graph::EdgeMap<double> *edgemap, double default_value)
 {
   if( edgemap_storage.find(name) == edgemap_storage.end() )
Index: mapstorage.h
===================================================================
--- mapstorage.h	(revision 111)
+++ mapstorage.h	(revision 118)
@@ -9,4 +9,6 @@
 #include "xymap.h"
 #include <libgnomecanvasmm.h>
+
+///class MapStorage handles NodeMaps and EdgeMaps.
 
 ///Class MapStorage is responsible for storing
@@ -23,4 +25,5 @@
 public:
 
+  ///The graph for which the datas are stored.
   Graph graph;
   /// the coordinates of the nodes
@@ -29,5 +32,8 @@
   XYMap<Graph::EdgeMap<double> > arrow_pos;
 
+  ///The content of the object has changed, update is needed.
   bool modified;
+
+  ///Name of file loaded in object.
   std::string file_name;
 
@@ -38,20 +44,20 @@
   std::map< std::string,Graph::EdgeMap<double> * > edgemap_storage;
 
-  //Stores the default values for the different visualization node attributes
+  ///Stores the default values for the different visualization node attributes
   std::vector<Graph::NodeMap<double> > default_nodemaps;
 
-  //Stores the default values for the different visualization edge attributes
+  ///Stores the default values for the different visualization edge attributes
   std::vector<Graph::EdgeMap<double> > default_edgemaps;
 
-  //Stores the active maps for the different visualization node attributes
+  ///Stores the active maps for the different visualization node attributes
   std::vector< std::string > active_nodemaps;
 
-  //Stores the active maps for the different visualization edge attributes
+  /// Stores the active maps for the different visualization edge attributes
   std::vector< std::string > active_edgemaps;
 
-  // Default values for the maps
+  /// Default values for the maps
   std::map< std::string, double > nodemap_default;
 
-  // Default values for the maps
+  /// Default values for the maps
   std::map< std::string, double > edgemap_default;
 
@@ -59,44 +65,96 @@
 
 protected:
+  /// type of the signal emitted if the visualization of the maps might have to be updated.
+
+  /// bool shows us whether the changed map is edge or nodemap.
+  /// int tells us the refreshed property
   typedef sigc::signal<void, bool, int> Signal_Prop;
+
+  /// Signal emitted on any change made on map values
   Signal_Prop signal_prop;
+
+  /// Signal emitted in the case of nodemap addition
+
+  /// std::string is the
+  ///name of the new map
   sigc::signal<void, std::string> signal_node_map;
+
+  /// Signal emitted in the case of edgemap addition
+
+  /// std::string is the
+  ///name of the new map
   sigc::signal<void, std::string> signal_edge_map;
 
 public:
-  ///Constructor of MapStorage. Expects the Graph of
-  ///which maps will be stored in it.
+  ///Constructor of MapStorage.
+
   ///Its all activity is initializing default values
-  ///for different visualization attributes
-  ///
-  ///\param graph is the graph for which the maps are stored in this object.
+  ///for different visualization attributes.
   MapStorage();
 
+  ///Destructor of MapStorage
+
+  ///Maps stored here are created with new. Destructor
+  ///deletes them to free up the reserved memory.
   ~MapStorage();
 
-  void changeActiveMap(bool, int, std::string);
-
-  std::string getActiveEdgeMap(int);
-  std::string getActiveNodeMap(int);
-
+  /// Registrates if the shown map by any attribute has changed to another.
+
+  ///It handles the \ref active_edgemaps and
+  ///\ref active_nodemaps vectors. It also emits \ref signal_prop signal to let
+  ///know the interested objects that the visible map of a certain
+  ///attribute has changed.
+  ///\param itisedge edgemap or nodemap has changed
+  ///\param prop the property of which the map is changed
+  ///\param mapname the visible map
+  void changeActiveMap(bool itisedge , int prop , std::string mapname);
+
+  /// Returns the active edgemap shown by a visualization property.
+
+  /// \param prop is the property
+  ///that shows the requested map.
+  std::string getActiveEdgeMap(int prop);
+
+  /// Returns the active nodemap shown by a visualization property.
+
+  /// \param prop is the property
+  ///that shows the requested map.
+  std::string getActiveNodeMap(int prop);
+
+  /// Returns the names of the edgemaps stored here.
   std::vector<std::string> getEdgeMapList();
+
+  /// Returns the names of the nodemaps stored here.
   std::vector<std::string> getNodeMapList();
 
+  ///returns \ref signal_prop to be able to connect functions to it
   Signal_Prop signal_prop_ch();
 
+  ///returns \ref signal_node_map to be able to connect functions to it
   sigc::signal<void, std::string> signal_node_map_ch(){return signal_node_map;};
+
+  ///returns \ref signal_edge_map to be able to connect functions to it
   sigc::signal<void, std::string> signal_edge_map_ch(){return signal_edge_map;};
 
+  ///Adds given map to storage.
+
+  ///A name and the map itself has to be provided.
+  ///\param mapname is the name of map
+  ///\param nodemap is the pointer of the given nodemap
+  ///\param def the default value of the map. If not given, it will be 0.
+  ///If new edge is added to graph the value of it in the map will be this.
+  ///\todo map should be given by reference!
+  ///\todo why is default value stored?
+  int addNodeMap(const std::string & mapname,Graph::NodeMap<double> * nodemap, double def=0.0);
+
   ///Adds given map to storage. A name and the map itself has to be provided.
-  ///\param name is the name of map
-  ///\nodemap is the pointer of the given nodemap
+
+  ///A name and the map itself has to be provided.
+  ///\param mapname is the name of map
+  ///\param edgemap is the pointer of the given edgemap
+  ///\param def the default value of the map. If not given, it will be 0.
+  ///If new edge is added to graph the value of it in the map will be this.
   ///\todo map should be given by reference!
-  int addNodeMap(const std::string &,Graph::NodeMap<double> *, double);
-
-  ///Adds given map to storage. A name and the map itself has to be provided.
-  ///\param name is the name of map
-  ///\edgemap is the pointer of the given edgemap
-  ///\todo map should be given by reference!
-  int addEdgeMap(const std::string &,Graph::EdgeMap<double> *, double);
+  int addEdgeMap(const std::string & mapname,Graph::EdgeMap<double> * edgemap, double def=0.0);
 
   ///Returns how much nodemaps is stored in \ref MapStorage
@@ -106,37 +164,72 @@
   int numOfEdgeMaps() {return edgemap_storage.size();};
 
-  ///Returns the maximum value of the given NodeMap. NodeMap has to be given by its name.
-  ///\param name is the name of map of which maximum is searched
-  double maxOfNodeMap(const std::string &);
-
-  ///Returns the maximum value of the given EdgeMap. EdgeMap has to be given by its name.
-  ///\param name is the name of map of which maximum is searched
-  double maxOfEdgeMap(const std::string &);
-
-  ///Returns the minimum value of the given NodeMap. NodeMap has to be given by its name.
-  ///\param name is the name of map of which minimum is searched
-  double minOfNodeMap(const std::string &);
-
-  ///Returns the minimum value of the given EdgeMap. EdgeMap has to be given by its name.
-  ///\param name is the name of map of which minimum is searched
-  double minOfEdgeMap(const std::string &);
-
-  ///To be able to iterate through each maps this function returns an iterator pointing to the first nodemap in the storage.
+  ///Returns the maximum value of the given NodeMap.
+
+  ///NodeMap has to be given by its name.
+  ///\param name the name of map of which maximum is searched
+  double maxOfNodeMap(const std::string & name);
+
+  ///Returns the maximum value of the given EdgeMap.
+
+  ///EdgeMap has to be given by its name.
+  ///\param name the name of map of which maximum is searched
+  double maxOfEdgeMap(const std::string & name);
+
+  ///Returns the minimum value of the given NodeMap.
+
+  ///NodeMap has to be given by its name.
+  ///\param name the name of map of which minimum is searched
+  double minOfNodeMap(const std::string & name);
+
+  ///Returns the minimum value of the given EdgeMap.
+
+  ///EdgeMap has to be given by its name.
+  ///\param name the name of map of which minimum is searched
+  double minOfEdgeMap(const std::string & name);
+
+  ///Returns iterator pointing to the first NodeMap in storage.
+
+  ///To be able to iterate through each maps this function
+  ///returns an iterator pointing to the first nodemap in
+  ///the storage.
   std::map< std::string,Graph::NodeMap<double> * >::iterator beginOfNodeMaps(){return nodemap_storage.begin();};
 
-  ///To be able to iterate through each maps this function returns an iterator pointing to the first edgemap in the storage.
+  ///Returns iterator pointing to the first EdgeMap in storage.
+
+  ///To be able to iterate through each maps this function
+  ///returns an iterator pointing to the first edgemap in
+  ///the storage.
   std::map< std::string,Graph::EdgeMap<double> * >::iterator beginOfEdgeMaps(){return edgemap_storage.begin();};
 
-  ///To be able to iterate through each maps this function returns an iterator pointing to the last nodemap in the storage.
+  ///Returns iterator pointing after the last NodeMap in storage.
+
+  ///To be able to iterate through each maps this function
+  ///returns an iterator pointing to the last nodemap in the storage.
   std::map< std::string,Graph::NodeMap<double> * >::iterator endOfNodeMaps(){return nodemap_storage.end();};
 
-  ///To be able to iterate through each maps this function returns an iterator pointing to the last edgemap in the storage.
+  ///Returns iterator pointing after the last EdgeMap in storage.
+
+  ///To be able to iterate through each maps this function
+  ///returns an iterator pointing to the last edgemap in the storage.
   std::map< std::string,Graph::EdgeMap<double> * >::iterator endOfEdgeMaps(){return edgemap_storage.end();};
 
-  void mapChanged(bool, std::string);
-
+  ///Emits \ref signal_prop if mapvalues have changed, and MapStorage gets to know it.
+
+  ///If values in a map have changed, this function checks, whether it is displayed.
+  ///This check means searching the given mapname between active maps
+  ///(\ref active_nodemaps, \ref active_edgemaps). If it is there at a certain property,
+  ///it emits a signal with the property, where the gotten mapname was found. One signal
+  ///is emitted for each property displaying the given map.
+  ///\param itisedge whether the map an edgemap or nodemap
+  ///\param mapname name of map to visualize
+  void mapChanged(bool itisedge, std::string mapname);
+
+  ///Read datas from the given filename.
   int readFromFile(const std::string &);
+
+  ///Save datas to the given filename.
   void writeToFile(const std::string &);
 
+  ///Deletes all datastructures stored here.
   void clear();
 
Index: new_map_win.cc
===================================================================
--- new_map_win.cc	(revision 117)
+++ new_map_win.cc	(revision 118)
@@ -73,10 +73,28 @@
       //get and formulate text
       std::string def_val_str=default_value.get_text();
-      std::string polishform=string2Polishform(def_val_str,edge.get_active());
+
+      bool only_nums=true;
+      for(int i=0;i<(int)def_val_str.size() && only_nums;i++)
+	{
+	  if( def_val_str[i]<'0' || def_val_str[i]>'9' )
+	    {
+	      only_nums=false;
+	    }
+	}
+      std::string polishform;
+
+      if(only_nums)
+	{
+	  def_val=atof(def_val_str.c_str());
+	}
+      else
+	{
+	  polishform=string2Polishform(def_val_str,edge.get_active());
+	}
 
       //get name of text
       std::string mapname=name.get_text();
-
-      if(!mapname.empty()&&!polishform.empty())
+      
+      if(!mapname.empty()&&(!polishform.empty()||only_nums))
 	{
 	  int abortion=0;
@@ -84,66 +102,69 @@
 	    {
 	      //create the new map
-	      Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (mytab.mapstorage.graph);
-
-	      std::stack<double> polishstack;
-  
-	      for(EdgeIt k(mytab.mapstorage.graph); k!=INVALID; ++k)
-		{
-		  for(int i=0;i<(int)polishform.size();i++)
+	      Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (mytab.mapstorage.graph, def_val);
+	      
+	      if(!only_nums)
+		{
+		  std::stack<double> polishstack;
+		  
+		  for(EdgeIt k(mytab.mapstorage.graph); k!=INVALID; ++k)
 		    {
-		      double op1, op2;
-		      bool operation=true;
-		      switch(polishform[i])
+		      for(int i=0;i<(int)polishform.size();i++)
 			{
-			case '+':
-			case '-':
-			case '/':
-			case '*':
-			  op1=polishstack.top();
-			  polishstack.pop();
-			  op2=polishstack.top();
-			  polishstack.pop();
-			  break;
-			default:
-			  //substitute variable
-			  std::map< std::string,Graph::EdgeMap<double> * > ems=mytab.mapstorage.edgemap_storage;
-			  bool itisvar=(ems.find(ch2var[ polishform[i] ])!=ems.end());
-			  if(itisvar)
-			    {
-			      polishstack.push( (*(mytab.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);
-			    }
-			  else
-			    {
-			      polishstack.push(atof(ch2var[ polishform[i] ].c_str()));
-			    }
-			  operation=false;
-			  break;
-			}
-		      if(operation)
-			{
-			  double res;
+			  double op1=0, op2=0;
+			  bool operation=true;
 			  switch(polishform[i])
 			    {
 			    case '+':
-			      res=op1+op2;
-			      break;
 			    case '-':
-			      res=op2-op1;
-			      break;
 			    case '/':
-			      res=op2/op1;
-			      break;
 			    case '*':
-			      res=op1*op2;
+			      op1=polishstack.top();
+			      polishstack.pop();
+			      op2=polishstack.top();
+			      polishstack.pop();
 			      break;
 			    default:
-			      std::cout << "How could we get here?" << std::endl;
+			      //substitute variable
+			      std::map< std::string,Graph::EdgeMap<double> * > ems=mytab.mapstorage.edgemap_storage;
+			      bool itisvar=(ems.find(ch2var[ polishform[i] ])!=ems.end());
+			      if(itisvar)
+				{
+				  polishstack.push( (*(mytab.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);
+				}
+			      else
+				{
+				  polishstack.push(atof(ch2var[ polishform[i] ].c_str()));
+				}
+			      operation=false;
 			      break;
 			    }
-			  polishstack.push(res);
-			}
-		    }
-		  (*emptr)[k]=polishstack.top(); 
-		}
+			  if(operation)
+			    {
+			      double res;
+			      switch(polishform[i])
+				{
+				case '+':
+				  res=op1+op2;
+				  break;
+				case '-':
+				  res=op2-op1;
+				  break;
+				case '/':
+				  res=op2/op1;
+				  break;
+				case '*':
+				  res=op1*op2;
+				  break;
+				default:
+				  std::cout << "How could we get here?" << std::endl;
+				  break;
+				}
+			      polishstack.push(res);
+			    }
+			}//foreach letter in polishform
+		      (*emptr)[k]=polishstack.top(); 
+		    }//foreach edge
+		}//!only_nums
 
 	      //if addition was not successful addEdgeMap returns one.
@@ -164,66 +185,68 @@
 	    {
 	      //create the new map
-	      Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (mytab.mapstorage.graph);
-
-	      std::stack<double> polishstack;
+	      Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (mytab.mapstorage.graph, def_val);
+
+	      if(!only_nums)
+		{
+		  std::stack<double> polishstack;
   
-	      for(NodeIt k(mytab.mapstorage.graph); k!=INVALID; ++k)
-		{
-		  for(int i=0;i<(int)polishform.size();i++)
+		  for(NodeIt k(mytab.mapstorage.graph); k!=INVALID; ++k)
 		    {
-		      double op1, op2;
-		      bool operation=true;
-		      switch(polishform[i])
+		      for(int i=0;i<(int)polishform.size();i++)
 			{
-			case '+':
-			case '-':
-			case '/':
-			case '*':
-			  op1=polishstack.top();
-			  polishstack.pop();
-			  op2=polishstack.top();
-			  polishstack.pop();
-			  break;
-			default:
-			  std::map< std::string,Graph::NodeMap<double> * > nms=mytab.mapstorage.nodemap_storage;
-			  bool itisvar=(nms.find(ch2var[ polishform[i] ])!=nms.end());
-			  if(itisvar)
-			    {
-			      polishstack.push( (*(mytab.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);
-			    }
-			  else
-			    {
-			      polishstack.push(atof(ch2var[ polishform[i] ].c_str()));
-			    }
-			  operation=false;
-			  break;
-			}
-		      if(operation)
-			{
-			  double res;
+			  double op1=0, op2=0;
+			  bool operation=true;
 			  switch(polishform[i])
 			    {
 			    case '+':
-			      res=op1+op2;
-			      break;
 			    case '-':
-			      res=op2-op1;
-			      break;
 			    case '/':
-			      res=op2/op1;
-			      break;
 			    case '*':
-			      res=op1*op2;
+			      op1=polishstack.top();
+			      polishstack.pop();
+			      op2=polishstack.top();
+			      polishstack.pop();
 			      break;
 			    default:
-			      std::cout << "How could we get here?" << std::endl;
+			      std::map< std::string,Graph::NodeMap<double> * > nms=mytab.mapstorage.nodemap_storage;
+			      bool itisvar=(nms.find(ch2var[ polishform[i] ])!=nms.end());
+			      if(itisvar)
+				{
+				  polishstack.push( (*(mytab.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);
+				}
+			      else
+				{
+				  polishstack.push(atof(ch2var[ polishform[i] ].c_str()));
+				}
+			      operation=false;
 			      break;
 			    }
-			  polishstack.push(res);
+			  if(operation)
+			    {
+			      double res;
+			      switch(polishform[i])
+				{
+				case '+':
+				  res=op1+op2;
+				  break;
+				case '-':
+				  res=op2-op1;
+				  break;
+				case '/':
+				  res=op2/op1;
+				  break;
+				case '*':
+				  res=op1*op2;
+				  break;
+				default:
+				  std::cout << "How could we get here?" << std::endl;
+				  break;
+				}
+			      polishstack.push(res);
+			    }
 			}
+		      (*emptr)[k]=polishstack.top(); 
 		    }
-		  (*emptr)[k]=polishstack.top(); 
-		}
-
+		}
 	      //if addition was not successful addNodeMap returns one.
 	      //cause can be that there is already a map named like the new one
