sorteing out coordinate mess