I don’t have a working solution for this in bp, only in c++, I can post some bits from it if that would help.