fixes #7, fixes #9, fixes #10, fixes #14, fixes #16,