Added copy instead of changing original input