added metric option for calculating distances
removed extraneous spaces