cleanup of external