It's not clear what you want improved here. But if your code is working, and you're just asking for general tips of "how is my code, is there anything I can do better?", the place for that is
Code Review, not Stack Overflow. (But make sure to read their help before posting there—they have their own rules for what's on-topic, and what information to include in a question, and so on.) —
abarnert 1 min ago