update coordinate directions