change data structure flat