refractor DAO pattern