save function implemented

- save function is now implemented