extract the DAO into a separate class.