tidied up saving function
working on save function
working on save function
working on save function