Thanks for the sample code. I don't think I could have come up with that