clone the array so the original data is not modified!