Added refactored code to solo challenge