modified to use the unified patch