Added untested code fixes #3