@karenwnc I'm 7 months late to the party and out of words.
HUGE respect to you for taking the time and patience in understanding the algorithm, its mathematical concepts, and implementing it in code. I very much enjoyed reading your post as if I was witnessing the actual journey