patch generation