dao refactoring