fixed issue #6 and wrote passing test
Merge pull request #8 from stevenabrooks/master

fixed issue #6 and wrote passing test