make data encoding on a clone and not change the origin data object