rewrite and do it all