using copy instead of deep copy