Using dynamic arrays for shape management