saving before change algo