db added. dao refactored