Hello,

(my first pull request contained wrong code).
Maybe this is useful for you.

Marvin