recursive env copy