rewrite dao