fixes #78

Implements and rudimentary tests a solution for #78.