use copy instead of assign