fix and rename shallowCopy to mutableCopy