Actually, the credit should go to Neil Deakin who wrote the code.
Daniel: Thanks for pointing it out - I will make sure to thank Neil.