rewrite using do notation
rewrite using >>=