fixes #6
fixes #5
fixes #4
fixes #7