Slightly better rewrite