remove duplication of code
Merge pull request #199 from MartinGoulet/dry

remove duplication of code