recursive structure copy