dao refactor