added reference types
updated Array to mutate the source array