making a copy of X to be on the safe side that the original input is not changed
making a copy of X to be on the safe side that the original input is not changed

jdammers/jumeg,fboers/jumeg,pravsripad/jumeg