refactor daos
improve logging