this fixes #138, next: thorough code review