reorganize data structure.