using an array instead of an object for the coordinates