fixes #18, working on #12...