update the delete() node api so it's more efficient and clear