Refactor: extract to method
Merge pull request #5 from sue445/feature/dry

Refactor: extract to method