fixes #8 fixes #7 fixes #6