uploaded completed refactored solution one