refactoring DAOImpl