DAO Updated

TODO: template pass by reference