update dao and add unit test