use delete method in sample code