improvements to update and delete