add recursive method in PInsertion.py