move logging to setCoords function