change manual output to print array