function saveData Finish