Refactored and simplified 17.