updated dao, code cleanup