made coordinate function