added indexCopy