new code seems to be OK (?)
still not plugged in though
-> tests required
-> feedback welcome :-)