Could you like send me some input data and maybe the code of the function that does this? I'd love to give it a look as well. I could poke you on Skype once home.
Edit: as it stands we've put a lot of work under this tag and would hate to be forced to change it