copy locals