update code to delete str