add extern patch