Refactored to enhance readability.