implement function to delete