refact Dao & test