refactor DataFactory