Hi Dave, I'm sure you don't mind that :) Actually there's no problem with the code, it was me behaving stupid newish. Again I appreciate your help. I guess it's through such forums as ruby-forum that morons like me get to learn and like programming. Best regards, Bishar -- Posted via http://www.ruby-forum.com/.