Rewrite attempt 4