distance between points function added
UI pause fix