rewrite using atom