created loop to bypass inability of alert to print array properties