cleanup; extern cleanup