Thanks for the reply. I guess there are 1000 ways to do this but nice to find a solution without libraries.