have added back in the delete function. Just need to write the rewritting parts.