Updated function documentation, refactored example solution
Switched to Euclidian distance calculation