Rewrite in a smarter way. No functional change.