former script was using thisData instead of data for the accumulated data array