I've been using a similar loop but didn't know about the UNION trick...that kicks a$$