this closes #2, fixes #1