reduced duplication
Merge pull request #139 from alexeyraspopov/patch-1

reduced duplication