added refactored solutions