Ok, heres the next iteration based on feedback from Thomas and Peter. It seems this is good form in matching what the original code does. I have a few doubts in labelled as XXX in there. Thomas, if you have time, do you mind looking at those? The usual testing happened i.e "if you can see this email, it must have worked";-> cheers, jamal