DAO implemetation and Tests