Almost finished the compatible method in PatchAndIndex.