your version works fine.
thanks for the explanation and the shorter code smile