Create apply_patches