Utilize the prepare function for patching