Standard forum etiquette is to leave your question unedited and to post the solution you found, for a couple of reasons:
- It may help others with similar requirements
- People here might suggest alternative solutions which perform better or are more elegant than the one you have found.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel