replace Haversine method with Euclidean method
other fixes