Can you tell me why it’s wrong?
There are dedicated libraries to achieve the same thing. And you are saying this is wrong.

Passionate about Clean code and SOLID Architecture