Hi Vincent, Thanks for the Christmas present - a very neat solution IMO. As you say, it's hard to think of a simpler one. The only issue might be the heuristic for determining which stack you're on - I leave it to AES gurus to say if there could be a problem with your method ... Joyeux Noel (et Bonne Annee), Roger Burrows