added saving
Added saving function