refactored dao again