That was a long time ago, you’re asking about a several years-old question. 🙂 The Stack Overflow solution pointed me in the right direction, but I don’t recall whether I succeeded in bringing the concepts into my choice language (C#) at the time.