Trimmed solution 31