Add save data logic