refactor dataStructure