refine dao with test