Started work on save function