Simplified version trimming.