Code repetition refactored
Merge pull request #189 from AZielinski/master

Code repetition refactored