added tests and addressed #109
Merge pull request #153 from xrotwang/testing

added tests and addressed #109