dup to avoid mutating string