basic of DAO refactoring