Can you show your blocks?
I used this to convert
Setup necessary variables
Main block
Supporting functions
Result:
This is a first attempt and you can enhance it a lot but it works.