Thank you Mountain Mama for the explanation and Kuroi for the simplification. Elegant and it works great!

David