fixes #3 and fixes #2