I rewrite the codes clearly and explain them with comments.
https://chat.openai.com/g/g-48UudKpVn-code-commentator