finished update function attempted delete function