finalizing patch script