More work on #2
fixes #3