refactor DAO