data service refactoring