added tests.
Merge pull request #1 from anonymoose/master

added tests.