optimize the save losg