If it works, then it's all good.
Years ago when programmers had to write code for Commodore 64's they had to be super efficient. They had to write elegant code in order to make it fit in 64k of ram and they had to make it elegant in order to run quickly on an 8 bit CPU.
Today, programmers have a LOT more freedom to write functional code rather than elegant.
The questions you need to ask yourself as to whether your method is the best.
1. Does the code work as intended?
2. Can you follow how the code works?
3. Is this code for public consumption or just for internal use?
Does the code do what you want, does it do it quickly enough, does it not gobble an excess of ram... is it functional?
The only time I get concerned with elegance is if I'm writing code for someone other than myself who also understands how to write code. In that case, I try to make it elegant so they don't think I'm a total noob. For my own use, I comment my code so I can come back later and figure out "what the hell was I thinking."
In all honesty, the vast majority of your end users won't give a damn about code elegance. What they will give a damn about is how it looks, is it fast and does it contain bugs.