use copy of array