add update functionality to save method
add the insert method
add the update method