Now i know why NR is so good - if you can whip something out that quickly and easily - dropped your code into a function node chained to my previous node and BOOM - exactly what i needed - thanks Nick
Now to study up online and understand what it is doing !