* fixed double definition of variable
* changed access to map items (from [] to find())