Hi, I have written a library that is useful in these types of cases.
I rewrote @PavelBoytchev’s example using it: