I cannot edit my prior post, but I forgot to mention, that an inspiration for me was the code provided by @fxshrat in this post: