added tests from PR #103
Merge pull request #110 from cryptix/master

added tests from PR #103