refactoring DAO