some distance calculating
better distance logging