rewrite example 3