Added generator version of patch and signature functions