added refactored solution
comment out soln to test refactored soln