unit tests added
Merge pull request #22 from andrewblond/unit_tests

unit tests added