excellent ^^ thanks this indeed helped me alot. I was not aware of the whole objects <=> associative array thingie and will look into it. it makes perfect sense now thanks to your explanation.
just a last small question out of curiousity:
is there another way to write tool[ev.type]? I don't think tool.ev.type would work, would it?