Changed the save function.

No need for a separate function that is used one time.