chatGPT is like stackoverflow on steroids .. but stackoverflow is strongly suggesting against using the code from chatgpt. i did try it for a couple of things - reasonable success - may be needs a few tries (like yours )