fixes #5, fixes #2
merge