updating examples to use classes and DAOs instead of objects