fixes #7 and fixes #8