change structure of data saving