Thanks - that worked great! ..but it got me thinking. How could I do the same thing only instead of processing your code on a finished file if I could do the same thing as the file is being built? In other words, when code hits a relay that has already appeared with a state, the newly read state would be "pushed" along side of the previous one.