refactoring and intermediate solution
Merge branch 'master' of https://github.com/von-doggles/dailyprogrammer-159