created update, insert, and delete functions

these functions handle any errors that occur during
update/insert/delete.