Update map in loop

Thank you very much, it worked. And thanks for small explanation.

I think i understand how things work now looking at your code.

Once again thanks