started saving function