To amplify what marto is saying I must point out your solution did not take 10 minutes. It took all the time you sank into it yesterday and the write up and so on; every time you encounter a similar problem, you'll have a similar hurdle. It will also leave code that will be confusing and frustrating for any developer who tries to work on it after you. And that includes you if you come back to it in a year and can't remember what you were thinking. Adopting a community standard solution is going to be easier and better than hacking around a problem almost every time.