fixes #3, fixes #2, fixes #1