fixes #3
fixes #5, fixes #4 and fixes #2