replace .x/.y notation with array notation