dto and dao refactoring