DRY code, add tests for new method
Merge pull request #488 from Trott/dry

DRY code, add tests for new method