a simpler rewrite