The post I have linked to in my previous post is nearly the same (typos included) as the first one of this thread, so you can't say this is a new problem. AnomalousMonk gave you an answer (which is basically the same as mine, except more complete and correct), but you haven't answered back. So all we could do is tell you the same thing as he did, but if you don't give any information on why his answer doesn't fit your problem, or don't tell us that you didn't understand it, we can't help you any further. The test that AnomalousMonk run seems to demonstrate that it does work for your input data, did you actually try it?