I\'ve been searching the web for the last 3 hours. I found what I needed, and it works fine but I also want to fully understand how it works. This is the reference answer an