apply patch