created SparseArray_copy() function