revise code and unify daos