add coordinates into array