Added file to contain common distance algorithms
updated to be more intuitive