Working on the dao, still have some errors