debugging dynamic arrays