added delete function.