almost working (iterated array with referenced member is changed during run)