std10093: would you mind indenting your code properly? I can understand if you just copy and paste patta's code, but when you are going to make your own examples, format them. My eyes glazed over looking at the code you posted, so I actually did miss the fact that you are also recommending the use of functions that do one thing and do it well.