Comment your code below(as per instruction) we will analyze provide you suggestion or refactored code that will be easy to read, to modify, and plenty of good practice.
Read the 4th point of Don’t
This post is dedicated to refactor existing code.
that’s why i asked you to create a new post
improving your existing code is different than adding a new capabilities/ bug fix to the code
(I will remove your thread later. just to make things organize.)
i am willing to help you, just create a new post so, it’s organized and other can benefit from it and this post will be locked in 24 hours.