inserted array with index numbers in alert boxes