first version of the dao layer