You already had a similar thread - function which I have closed now.