refactoring. returning toDAO/SERVICE/RESOURCE