added refactored solution added refactored solution added refactored solution added refactored solution added refactored solution added refactored solution added refactored solution added refactored solution added refactored solution