refactor to DAO