creating a new array vs updating an old one