This makes some proress on #21. Still, the question remains if a more generic solution exists.
mentioned in issue #21